import requests
from flask import request

SESSION = None


def get_params(key):
    if request.json:
        return request.json.get(key)
    return None


def get_session():
    global SESSION
    if not SESSION:
        SESSION = requests.session()
    return SESSION
